using UnityEngine;
using System.Collections;

public class ShowGray : MonoBehaviour {
	private GrayscaleEffect gray;
	// Use this for initialization
	void Start () {
		gray = GetComponent<GrayscaleEffect>();
		if(! gray){
			gray = gameObject.AddComponent<GrayscaleEffect>();
			gray.shader = Shader.Find("Hidden/Grayscale Effect");
		}
		OnUnshowGray();
	}
	void OnShowGray(){
		if(gray)
			gray.enabled = true;
	}
	void OnUnshowGray(){
		if(gray)
			gray.enabled = false;
	}
}
